Ext.define('Seq.form.field.DateTime', {
	        extend : 'Seq.form.FieldContainer',
	        xtype : 'xdatetimefield',
	        requires : ['Ext.form.field.Time'],
	        config : {
		        value : ''
	        },
	        defaultBindProperty : 'value',

	        publishes : {
		        value : true
	        },

	        increment : 60,
	        alowBlank : false,

	        setValue : function(val) {
		        if (val) {
			        var me = this;
			        this.items.items[0].setValue(new Date(val));
			        this.items.items[1].setValue(new Date(val));
		        }
	        },

	        publishValue : function(date, time) {
		        var me = this, dateTimeStr = '';
		        if (me.rendered) {
			        date = date ? date : new Date();
			        time = time ? time : new Date();
			        localStr = Ext.util.Format.date(date, 'Y-m-d') + ' ' + Ext.util.Format.date(time, 'H:i');
			        me.publishState('value', new Date(localStr).toJSON());
		        }
	        },
	        items : [{
		                xtype : 'xdatefield',
		                margin : '0 5 0 0',
		                flex : 4,
		                listeners : {
			                select : function(me, record) {
				                var ct = me.ownerCt, time = ct.items.items[1].getValue();
				                ct.publishValue(record, time);
			                }
		                }
	                }, {
		                xtype : 'timefield',
		                format : 'H:i',
		                flex : 3,
		                listeners : {
			                select : function(me, record) {
				                var ct = me.ownerCt, date = ct.items.items[0].getValue();
				                ct.publishValue(date, record.data.date);
			                }
		                }
	                }],

	        initComponent : function() {
		        var me = this, date = me.items[0], time = me.items[1];
		        date.alowBlank = me.alowBlank;
		        time.alowBlank = me.alowBlank;
		        time.increment = me.increment;
		        me.callParent(arguments);
	        }
        })